package JavaGrammar.TreeScanners;

import java.util.*;
import java.lang.reflect.*;

import SymbolTable.*;
import FlowGraph.*;
import FlowGraph.Nodes.*;
import FlowGraph.EdgeInfo.*;
import FlowGraph.StatementInfo.*;
import JavaGrammar.*;
import util.*;
import db.ClassData;
import FlowGraph.Transformations.*;
import FlowGraph.SSA.*;

import antlr.*;
// $ANTLR 2.7.1: "MethodParser.g" -> "MethodParser.java"$

import antlr.TreeParser;
import antlr.Token;
import antlr.collections.AST;
import antlr.RecognitionException;
import antlr.ANTLRException;
import antlr.NoViableAltException;
import antlr.MismatchedTokenException;
import antlr.SemanticException;
import antlr.collections.impl.BitSet;
import antlr.ASTPair;
import antlr.collections.impl.ASTArray;


public class MethodParser extends antlr.TreeParser
       implements MethodParserTokenTypes
 {

    public String methodName;
    public String callerName;
    public String callerType;
    public LinkedList parameters;
    public LinkedList parameterTypes = new LinkedList();
    public LinkedList nArray = new LinkedList();

    public String returnType;
    public String assignToVar;
    public AST astList;

    public void addSymbolTable(SymbolTable t) {
        _symbolTables.add(t);
    }

    public void setClassName(String className) {
        _className = className;
    }

    public void setPackage(String pack) {
        _package = pack;
    }

    public void setClassInfo(ClassData ci) {
        _currentCInfo = ci;
    }

    private ClassData _currentCInfo;

    private StringBuffer _currentID;
    private StringBuffer _currentModifiers;
    private StringBuffer _currentEXPR;
    private LinkedList _exprList = new LinkedList();
    private Stack _exprStack = new Stack();
    private Stack _typeStack = new Stack();
    private Stack _nArrayStack = new Stack();
    private int _ntypeArray;
    private String _typeName;
    private String _currentConst;
    private StringBuffer _initializer;
    private StringBuffer _currentArrayDecl;

    private String _className;
    private String _currentEXPRType;
    private LinkedList _symbolTables = new LinkedList();   

    private boolean _parsingMethod = false;
    private boolean _parsingMethodCaller = false;

    private String _package;
    
    private int _narray = 0;
    private int _narrayOld;
    
    private LinkedList _newparameterTypes;
    private LinkedList _newnArray;
    
    /* Atualiza um valor existente do currentEXPRType a partir de um nome nao composto */
    private void updateCurrentType(String tk) {
        if(_currentEXPRType == null) return;
	
	String type = _currentEXPRType.toString();
        if(type != null) {
  	    boolean loaded = false;
 	    Class c = Util.getType(type, _className, _package, _currentCInfo.getImports());
	    
	    // Se o tipo atual for um array, o tk so pode ser length ou algum metodo de object 
	    if(c.isArray()) {
                if(tk.equals("length")) {
		    _currentEXPRType = new String("int");
		}
		else {
		    System.out.println("MethodParser.updateCurrentType : array case -> unkown " + tk);
		}
		return;
	    }

            // Verifica o caso de tk ser um campo da classe c
 	    try {
                Field f = c.getField(tk);
		c = f.getType();
	        _currentEXPRType = c.getName();

/*		_narray = 0;
		while(c.isArray()) {
		    _narray++;
                    c = c.getComponentType();
                } */
		
		loaded = true;		
	    }
	    catch(NoSuchFieldException ex) {
                _currentEXPRType = type;
            }
	    
            if(!loaded) {
                try {
		    Field f = c.getDeclaredField(tk);
                    c = f.getType();
		    _currentEXPRType = c.getName();
		    
/*		    _narray = 0;
		    while(c.isArray()) {
                        _narray++;
			c = c.getComponentType();
		    } */

                    loaded = true;
		}
		catch(NoSuchFieldException ex) {
		    _currentEXPRType = type;
	        }
	    }
	    
	    // Verifica o caso que tk e uma class interna
	    if(!loaded) {
	        String tname = new String(_currentEXPRType + "$" + tk);
	        Class [] classes = c.getDeclaredClasses();
		for(int i = 0;i < classes.length;i++) {
		    if(classes[i].getName().equals(tname)) {
		        _currentEXPRType = tname;
			loaded = true;
			break;		    
		    }
	        }
	    }

            if(!loaded) {
                System.out.println(" %%%% MethodParser ERROR : nao carreguei o field " + 
		    tk +  " a partir de  " + _currentEXPRType.toString());
	    }
	}
    }
public MethodParser() {
	tokenNames = _tokenNames;
}

	public final void parsemc(AST _t) throws RecognitionException {
		
		AST parsemc_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case CTOR_CALL:
			{
				returnType = null; assignToVar = null;
				AST __t2 = _t;
				AST tmp1_AST_in = (AST)_t;
				match(_t,CTOR_CALL);
				_t = _t.getFirstChild();
				
				parameters = new LinkedList(); 
				methodName = null;
				
				Class c = null;
				if(_currentCInfo.isInner()) {
				c = Util.getType(Util.innerClassLoader(_className), null,
				_package, _currentCInfo.getImports());
				}
				else {
				c = Util.getType(_className, null, _package, _currentCInfo.getImports());
				}
				
				callerType = c.getName();
				callerName = new String("this");
				
				elist(_t);
				_t = _retTree;
				
						     for(int i = 0;i < _exprList.size();i++) {
					                 parameters.add((String) _exprList.get(i));
					             }
						
				_t = __t2;
				_t = _t.getNextSibling();
				break;
			}
			case SUPER_CTOR_CALL:
			{
				AST __t3 = _t;
				AST tmp2_AST_in = (AST)_t;
				match(_t,SUPER_CTOR_CALL);
				_t = _t.getFirstChild();
				parameters = new LinkedList(); methodName = new String("super");
				{
				if (_t==null) _t=ASTNULL;
				switch ( _t.getType()) {
				case ELIST:
				{
					
					Class c = null;
					if(_currentCInfo.isInner()) {
					c = Util.getType(Util.innerClassLoader(_className), null,
					_package, _currentCInfo.getImports());
					}
					else {
					c = Util.getType(_className, null, _package, _currentCInfo.getImports());
					}
					c = c.getSuperclass();
					
					callerType = c.getName();
					callerName = new String("super");
					methodName = null;
					
					elist(_t);
					_t = _retTree;
					
					for(int i = 0;i < _exprList.size();i++) {
					parameters.add((String) _exprList.get(i));					
					}
					
					break;
				}
				case TYPE:
				case TYPECAST:
				case INDEX_OP:
				case METHOD_CALL:
				case IDENT:
				case DOT:
				case LITERAL_this:
				case LITERAL_super:
				case LITERAL_true:
				case LITERAL_false:
				case LITERAL_null:
				case LITERAL_new:
				case NUM_INT:
				case CHAR_LITERAL:
				case STRING_LITERAL:
				case NUM_FLOAT:
				case NUM_LONG:
				case NUM_DOUBLE:
				{
					primaryExpression(_t);
					_t = _retTree;
					System.out.println("METHOD PARSER!!!");
					elist(_t);
					_t = _retTree;
					break;
				}
				default:
				{
					throw new NoViableAltException(_t);
				}
				}
				}
				_t = __t3;
				_t = _t.getNextSibling();
				break;
			}
			case VARIABLE_DEF:
			{
				AST __t5 = _t;
				AST tmp3_AST_in = (AST)_t;
				match(_t,VARIABLE_DEF);
				_t = _t.getFirstChild();
				modifiers(_t);
				_t = _retTree;
				typeSpec(_t);
				_t = _retTree;
				variableDeclarator(_t);
				_t = _retTree;
				AST __t6 = _t;
				AST tmp4_AST_in = (AST)_t;
				match(_t,ASSIGN);
				_t = _t.getFirstChild();
				AST __t7 = _t;
				AST tmp5_AST_in = (AST)_t;
				match(_t,EXPR);
				_t = _t.getFirstChild();
				{
				if (_t==null) _t=ASTNULL;
				switch ( _t.getType()) {
				case TYPECAST:
				case METHOD_CALL:
				{
					mcall(_t);
					_t = _retTree;
					break;
				}
				case LITERAL_new:
				{
					_parsingMethod = true;
					newExpression(_t);
					_t = _retTree;
					
							               methodName = null;
					callerName = null;
					callerType = null;
					
					parameters = null;
								   
					parameterTypes = _newparameterTypes;
					nArray = _newnArray;
					assignToVar = null;
								       
								       
								       // Pode ser a declaracao de uma nova classe interna
								       
								       /*
								       StringTokenizer stk = new StringTokenizer(_currentEXPRType, ".");
								       if(stk.countTokens() > 1) {
								           StringBuffer buf = new StringBuffer();
									   int count = stk.countTokens() - 1;
									   for(int k = 0;k < count;k++) {
									       buf.append(stk.nextToken() + "$");
									   }
									   buf.append(stk.nextToken());
									   _currentEXPRType = buf.toString();
								       } */
								       
								       
					returnType = _currentEXPRType;
								       
								       
							
					break;
				}
				default:
				{
					throw new NoViableAltException(_t);
				}
				}
				}
				_t = __t7;
				_t = _t.getNextSibling();
				_t = __t6;
				_t = _t.getNextSibling();
				_t = __t5;
				_t = _t.getNextSibling();
				break;
			}
			case EXPR:
			{
				AST __t9 = _t;
				AST tmp6_AST_in = (AST)_t;
				match(_t,EXPR);
				_t = _t.getFirstChild();
				AST __t10 = _t;
				AST tmp7_AST_in = (AST)_t;
				match(_t,ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				mcall(_t);
				_t = _retTree;
				_t = __t10;
				_t = _t.getNextSibling();
				_t = __t9;
				_t = _t.getNextSibling();
				break;
			}
			case METHOD_CALL:
			{
				methodCall(_t);
				_t = _retTree;
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void elist(AST _t) throws RecognitionException {
		
		AST elist_AST_in = (AST)_t;
		_exprStack.push(_exprList); _exprList = new LinkedList();
		
		try {      // for error handling
			AST __t20 = _t;
			AST tmp8_AST_in = (AST)_t;
			match(_t,ELIST);
			_t = _t.getFirstChild();
			{
			_loop22:
			do {
				if (_t==null) _t=ASTNULL;
				if ((_t.getType()==EXPR)) {
					expression(_t);
					_t = _retTree;
					_exprList.add(_currentEXPR.toString());
									       parameterTypes.add(_currentEXPRType);
									       nArray.add(new Integer(_narray));
									
				}
				else {
					break _loop22;
				}
				
			} while (true);
			}
			_t = __t20;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void primaryExpression(AST _t) throws RecognitionException {
		
		AST primaryExpression_AST_in = (AST)_t;
		AST n1 = null;
		AST n2 = null;
		AST nx = null;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case IDENT:
			{
				n1 = (AST)_t;
				match(_t,IDENT);
				_t = _t.getNextSibling();
				
				_currentEXPR = new StringBuffer(n1.getText());
				if(_parsingMethod) {
				boolean resolved = false;
						// E um identificador ?
					        for(int i = 0;i < _symbolTables.size();i++) {
					            SymbolTable s = (SymbolTable) _symbolTables.get(i);
						    STEntry e = (STEntry) s.find(n1.getText());
						    if(e != null) {
							_narray = e.getNarray();
				
				// se for array, tem que criar a instancia
							int count = 0;
							Class comp = e.getType();
							while(count < _narray) {
							    Object obj = Array.newInstance(comp, 0);
							    comp = obj.getClass();
							    count++;
							}
							_currentEXPRType = comp.getName();
				
						        resolved = true;
						        break;
					 	    }
					        }
					        // E um tipo?
					        if(!resolved) {
					            Class c = Util.getType(n1.getText(), _className,
				_package, _currentCInfo.getImports());
						    if(c != null) {
						        resolved = true;
							//??
							_narray = 0;
						        _currentEXPRType = c.getName();
						    }
					        }
					        // E this ou super?
					        if(!resolved) {
					            if(n1.getText().equals("super")) {
						        Class c = Util.getType(_className, null, _package, _currentCInfo.getImports());
						        Class sup = c.getSuperclass();
						        _currentEXPRType = sup.getName();
						    }
						    else
						    if(n1.getText().equals("this")) {
					                _currentEXPRType = _className;
						    }
						    _narray = 0;
					        }
						// o identificador deve fazer parte de uma chamada static
						if(!resolved) {
						    _currentEXPRType = null;
						}
					    }
					
				break;
			}
			case DOT:
			{
				AST __t68 = _t;
				AST tmp9_AST_in = (AST)_t;
				match(_t,DOT);
				_t = _t.getFirstChild();
				String dot; String type;
				{
				if (_t==null) _t=ASTNULL;
				switch ( _t.getType()) {
				case TYPE:
				case TYPECAST:
				case INDEX_OP:
				case POST_INC:
				case POST_DEC:
				case METHOD_CALL:
				case UNARY_MINUS:
				case UNARY_PLUS:
				case IDENT:
				case DOT:
				case STAR:
				case LITERAL_this:
				case LITERAL_super:
				case ASSIGN:
				case PLUS_ASSIGN:
				case MINUS_ASSIGN:
				case STAR_ASSIGN:
				case DIV_ASSIGN:
				case MOD_ASSIGN:
				case SR_ASSIGN:
				case BSR_ASSIGN:
				case SL_ASSIGN:
				case BAND_ASSIGN:
				case BXOR_ASSIGN:
				case BOR_ASSIGN:
				case QUESTION:
				case LOR:
				case LAND:
				case BOR:
				case BXOR:
				case BAND:
				case NOT_EQUAL:
				case EQUAL:
				case LT:
				case GT:
				case LE:
				case GE:
				case LITERAL_instanceof:
				case SL:
				case SR:
				case BSR:
				case PLUS:
				case MINUS:
				case DIV:
				case MOD:
				case INC:
				case DEC:
				case BNOT:
				case LNOT:
				case LITERAL_true:
				case LITERAL_false:
				case LITERAL_null:
				case LITERAL_new:
				case NUM_INT:
				case CHAR_LITERAL:
				case STRING_LITERAL:
				case NUM_FLOAT:
				case NUM_LONG:
				case NUM_DOUBLE:
				{
					expr(_t);
					_t = _retTree;
					dot = _currentEXPR.toString(); type = _currentEXPRType;
					{
					if (_t==null) _t=ASTNULL;
					switch ( _t.getType()) {
					case IDENT:
					{
						n2 = (AST)_t;
						match(_t,IDENT);
						_t = _t.getNextSibling();
						
						_currentEXPR = new StringBuffer(dot + "." + n2.getText()); 
						
						// Isso aqui e porque quando eu determino o tipo do caller,
						// nao posso incluir o ultimo nome
						if(!_parsingMethodCaller) {
						updateCurrentType(n2.getText());
						}
						
						break;
					}
					case INDEX_OP:
					{
						arrayIndex(_t);
						_t = _retTree;
						System.out.println("methodparser primaryExpr arrayIndex!!!");
						break;
					}
					case LITERAL_this:
					{
						AST tmp10_AST_in = (AST)_t;
						match(_t,LITERAL_this);
						_t = _t.getNextSibling();
						
						_currentEXPR = new StringBuffer(dot + ".this");
						
						// Nao precisa do updateType, pois o ultimo nome e o tipo.
						// System.out.println("methodparser primaryExpr this!!!");
						
						break;
					}
					case LITERAL_class:
					{
						AST tmp11_AST_in = (AST)_t;
						match(_t,LITERAL_class);
						_t = _t.getNextSibling();
						
						_currentEXPR = new StringBuffer(dot + "." + "class");
						if(!_parsingMethodCaller) {					        
						_currentEXPRType = new String("java.lang.Class");
						}
						
						
						break;
					}
					case LITERAL_new:
					{
						AST __t71 = _t;
						AST tmp12_AST_in = (AST)_t;
						match(_t,LITERAL_new);
						_t = _t.getFirstChild();
						AST tmp13_AST_in = (AST)_t;
						match(_t,IDENT);
						_t = _t.getNextSibling();
						elist(_t);
						_t = _retTree;
						_t = __t71;
						_t = _t.getNextSibling();
						System.out.println("methodparser primaryExpr newIDENT!!!");
						break;
					}
					case LITERAL_super:
					{
						AST tmp14_AST_in = (AST)_t;
						match(_t,LITERAL_super);
						_t = _t.getNextSibling();
						System.out.println("methodparser primaryExpr super");
						break;
					}
					default:
					{
						throw new NoViableAltException(_t);
					}
					}
					}
					break;
				}
				case ARRAY_DECLARATOR:
				{
					AST __t72 = _t;
					AST tmp15_AST_in = (AST)_t;
					match(_t,ARRAY_DECLARATOR);
					_t = _t.getFirstChild();
					typeSpecArray(_t);
					_t = _retTree;
					_t = __t72;
					_t = _t.getNextSibling();
					System.out.println("methodparser primaryExpr arraydecla!!");
					break;
				}
				case LITERAL_void:
				case LITERAL_boolean:
				case LITERAL_byte:
				case LITERAL_char:
				case LITERAL_short:
				case LITERAL_int:
				case LITERAL_float:
				case LITERAL_long:
				case LITERAL_double:
				{
					builtInType(_t);
					_t = _retTree;
					{
					if (_t==null) _t=ASTNULL;
					switch ( _t.getType()) {
					case LITERAL_class:
					{
						AST tmp16_AST_in = (AST)_t;
						match(_t,LITERAL_class);
						_t = _t.getNextSibling();
						break;
					}
					case 3:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(_t);
					}
					}
					}
					System.out.println("methodparser primaryExpr builtIntype!!!");
					break;
				}
				default:
				{
					throw new NoViableAltException(_t);
				}
				}
				}
				_t = __t68;
				_t = _t.getNextSibling();
				break;
			}
			case INDEX_OP:
			{
				arrayIndex(_t);
				_t = _retTree;
				break;
			}
			case METHOD_CALL:
			{
				AST __t74 = _t;
				nx = _t==ASTNULL ? null :(AST)_t;
				match(_t,METHOD_CALL);
				_t = _t.getFirstChild();
				primaryExpression(_t);
				_t = _retTree;
				elist(_t);
				_t = _retTree;
				System.out.println("TEM METHOD CALL COMO PARAMETRO!!!!! -> " + nx.toStringTree() +
						                 " \ncinfo = " + _currentCInfo.getName() );
				_t = __t74;
				_t = _t.getNextSibling();
				break;
			}
			case TYPECAST:
			{
				String t; int na;
				AST __t75 = _t;
				AST tmp17_AST_in = (AST)_t;
				match(_t,TYPECAST);
				_t = _t.getFirstChild();
				StringBuffer ret = new StringBuffer("((");
				typeSpec(_t);
				_t = _retTree;
				
						         ret.append(_typeName + " ");
							 na = _ntypeArray;
						         for(int i = 0;i < _ntypeArray;i++) {
						             ret.append("[]");
						         }
							 ret.append(")");
							 t = _typeName;
						
				expr(_t);
				_t = _retTree;
				
						         ret.append(_currentEXPR.toString() + ")"); 
						         _currentEXPR = new StringBuffer(ret.toString());
							 _currentEXPRType = t;
							 _narray = na;
					
				_t = __t75;
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_new:
			{
				newExpression(_t);
				_t = _retTree;
				break;
			}
			case NUM_INT:
			case CHAR_LITERAL:
			case STRING_LITERAL:
			case NUM_FLOAT:
			case NUM_LONG:
			case NUM_DOUBLE:
			{
				constant(_t);
				_t = _retTree;
				_currentEXPR = new StringBuffer(_currentConst); _narray = 0;
				break;
			}
			case LITERAL_super:
			{
				AST tmp18_AST_in = (AST)_t;
				match(_t,LITERAL_super);
				_t = _t.getNextSibling();
				
					                    _currentEXPR = new StringBuffer("super"); 
							    Class t = Util.getType(_className, null, _package, _currentCInfo.getImports());
							    t = t.getSuperclass();
							    _currentEXPRType = t.getName();	
							    _narray = 0;
					
				break;
			}
			case LITERAL_true:
			{
				AST tmp19_AST_in = (AST)_t;
				match(_t,LITERAL_true);
				_t = _t.getNextSibling();
				_currentEXPR = new StringBuffer("true");  
					                  _currentEXPRType = new String("boolean"); 
							  _narray = 0;
				break;
			}
			case LITERAL_false:
			{
				AST tmp20_AST_in = (AST)_t;
				match(_t,LITERAL_false);
				_t = _t.getNextSibling();
				_currentEXPR = new StringBuffer("false"); 
					                  _currentEXPRType = new String("boolean");
							  _narray = 0;
				break;
			}
			case LITERAL_this:
			{
				AST tmp21_AST_in = (AST)_t;
				match(_t,LITERAL_this);
				_t = _t.getNextSibling();
				_currentEXPR = new StringBuffer("this"); 
					                  _currentEXPRType = _className;
							  _narray = 0;
				break;
			}
			case LITERAL_null:
			{
				AST tmp22_AST_in = (AST)_t;
				match(_t,LITERAL_null);
				_t = _t.getNextSibling();
				_currentEXPR = new StringBuffer("null"); 
					                   _currentEXPRType = new String("null");
							   _narray = 0;
				break;
			}
			case TYPE:
			{
				typeSpec(_t);
				_t = _retTree;
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void modifiers(AST _t) throws RecognitionException {
		
		AST modifiers_AST_in = (AST)_t;
		AST n1 = null;
		_currentModifiers = new StringBuffer();
		
		try {      // for error handling
			AST __t99 = _t;
			AST tmp23_AST_in = (AST)_t;
			match(_t,MODIFIERS);
			_t = _t.getFirstChild();
			{
			_loop101:
			do {
				if (_t==null) _t=ASTNULL;
				if ((_tokenSet_0.member(_t.getType()))) {
					n1 = _t==ASTNULL ? null : (AST)_t;
					modifier(_t);
					_t = _retTree;
					_currentModifiers.append(n1.getText() + " ");
				}
				else {
					break _loop101;
				}
				
			} while (true);
			}
			_t = __t99;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void typeSpec(AST _t) throws RecognitionException {
		
		AST typeSpec_AST_in = (AST)_t;
		_ntypeArray = 0;
		
		try {      // for error handling
			AST __t93 = _t;
			AST tmp24_AST_in = (AST)_t;
			match(_t,TYPE);
			_t = _t.getFirstChild();
			typeSpecArray(_t);
			_t = _retTree;
			_t = __t93;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void variableDeclarator(AST _t) throws RecognitionException {
		
		AST variableDeclarator_AST_in = (AST)_t;
		AST n1 = null;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case IDENT:
			{
				n1 = (AST)_t;
				match(_t,IDENT);
				_t = _t.getNextSibling();
				assignToVar = n1.getText();
				break;
			}
			case LBRACK:
			{
				AST tmp25_AST_in = (AST)_t;
				match(_t,LBRACK);
				_t = _t.getNextSibling();
				variableDeclarator(_t);
				_t = _retTree;
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void mcall(AST _t) throws RecognitionException {
		
		AST mcall_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case TYPECAST:
			{
				tcast(_t);
				_t = _retTree;
				break;
			}
			case METHOD_CALL:
			{
				methodCall(_t);
				_t = _retTree;
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void newExpression(AST _t) throws RecognitionException {
		
		AST newExpression_AST_in = (AST)_t;
		StringBuffer ret = new StringBuffer("new "); String type;
		
		try {      // for error handling
			AST __t85 = _t;
			AST tmp26_AST_in = (AST)_t;
			match(_t,LITERAL_new);
			_t = _t.getFirstChild();
			type(_t);
			_t = _retTree;
			ret.append(_typeName + "("); type = _currentEXPRType;
			{
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case ARRAY_DECLARATOR:
			{
				_currentArrayDecl = new StringBuffer();
				newArrayDeclarator(_t);
				_t = _retTree;
				
								    ret.append(_currentArrayDecl.toString());
							
				{
				if (_t==null) _t=ASTNULL;
				switch ( _t.getType()) {
				case ARRAY_INIT:
				{
					arrayInitializer(_t);
					_t = _retTree;
					ret.append("= " + _initializer.toString());	
					break;
				}
				case 3:
				{
					break;
				}
				default:
				{
					throw new NoViableAltException(_t);
				}
				}
				}
				
								  ret.append(")"); 
								  _currentEXPR = new StringBuffer(ret.toString());
								  _currentEXPRType = type; 
								
				break;
			}
			case ELIST:
			{
				
							          _typeStack.push(parameterTypes); 
								  parameterTypes = new LinkedList();
								  _nArrayStack.push(nArray);
								  nArray = new LinkedList(); 
								  _narrayOld = _narray; 
								
				elist(_t);
				_t = _retTree;
				// (objBlock)?
				if(_exprList.size() > 0) {
						                       for(int i = 0;i < _exprList.size() - 1;i++) {
							                   ret.append((String) _exprList.get(i) + ",");
							                }
							                ret.append((String) _exprList.get(_exprList.size() - 1));
							            }
							            ret.append(")");
							            _currentEXPR = new StringBuffer(ret.toString());
				
				_exprList = (LinkedList) _exprStack.pop();
								    
								    // Um jeito simples se salvar os dados quando processo um
								    // new Type() para construtor.
								    
								    _newparameterTypes = parameterTypes;
								    _newnArray = nArray;
				
								    parameterTypes = (LinkedList) _typeStack.pop();
								    nArray = (LinkedList) _nArrayStack.pop();
								    _narray = _narrayOld;
				
								    _currentEXPRType = type;
							
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
			}
			_t = __t85;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void expr2(AST _t) throws RecognitionException {
		
		AST expr2_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case QUESTION:
			{
				AST __t115 = _t;
				AST tmp27_AST_in = (AST)_t;
				match(_t,QUESTION);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t115;
				_t = _t.getNextSibling();
				break;
			}
			case ASSIGN:
			{
				AST __t116 = _t;
				AST tmp28_AST_in = (AST)_t;
				match(_t,ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t116;
				_t = _t.getNextSibling();
				break;
			}
			case PLUS_ASSIGN:
			{
				AST __t117 = _t;
				AST tmp29_AST_in = (AST)_t;
				match(_t,PLUS_ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t117;
				_t = _t.getNextSibling();
				break;
			}
			case MINUS_ASSIGN:
			{
				AST __t118 = _t;
				AST tmp30_AST_in = (AST)_t;
				match(_t,MINUS_ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t118;
				_t = _t.getNextSibling();
				break;
			}
			case STAR_ASSIGN:
			{
				AST __t119 = _t;
				AST tmp31_AST_in = (AST)_t;
				match(_t,STAR_ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t119;
				_t = _t.getNextSibling();
				break;
			}
			case DIV_ASSIGN:
			{
				AST __t120 = _t;
				AST tmp32_AST_in = (AST)_t;
				match(_t,DIV_ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t120;
				_t = _t.getNextSibling();
				break;
			}
			case MOD_ASSIGN:
			{
				AST __t121 = _t;
				AST tmp33_AST_in = (AST)_t;
				match(_t,MOD_ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t121;
				_t = _t.getNextSibling();
				break;
			}
			case SR_ASSIGN:
			{
				AST __t122 = _t;
				AST tmp34_AST_in = (AST)_t;
				match(_t,SR_ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t122;
				_t = _t.getNextSibling();
				break;
			}
			case BSR_ASSIGN:
			{
				AST __t123 = _t;
				AST tmp35_AST_in = (AST)_t;
				match(_t,BSR_ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t123;
				_t = _t.getNextSibling();
				break;
			}
			case SL_ASSIGN:
			{
				AST __t124 = _t;
				AST tmp36_AST_in = (AST)_t;
				match(_t,SL_ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr(_t);
				_t = _retTree;
				_t = __t124;
				_t = _t.getNextSibling();
				break;
			}
			case BAND_ASSIGN:
			{
				AST __t125 = _t;
				AST tmp37_AST_in = (AST)_t;
				match(_t,BAND_ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t125;
				_t = _t.getNextSibling();
				break;
			}
			case BXOR_ASSIGN:
			{
				AST __t126 = _t;
				AST tmp38_AST_in = (AST)_t;
				match(_t,BXOR_ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t126;
				_t = _t.getNextSibling();
				break;
			}
			case BOR_ASSIGN:
			{
				AST __t127 = _t;
				AST tmp39_AST_in = (AST)_t;
				match(_t,BOR_ASSIGN);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr(_t);
				_t = _retTree;
				_t = __t127;
				_t = _t.getNextSibling();
				break;
			}
			case LOR:
			{
				AST __t128 = _t;
				AST tmp40_AST_in = (AST)_t;
				match(_t,LOR);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t128;
				_t = _t.getNextSibling();
				break;
			}
			case LAND:
			{
				AST __t129 = _t;
				AST tmp41_AST_in = (AST)_t;
				match(_t,LAND);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t129;
				_t = _t.getNextSibling();
				break;
			}
			case BOR:
			{
				AST __t130 = _t;
				AST tmp42_AST_in = (AST)_t;
				match(_t,BOR);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t130;
				_t = _t.getNextSibling();
				break;
			}
			case BXOR:
			{
				AST __t131 = _t;
				AST tmp43_AST_in = (AST)_t;
				match(_t,BXOR);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t131;
				_t = _t.getNextSibling();
				break;
			}
			case BAND:
			{
				AST __t132 = _t;
				AST tmp44_AST_in = (AST)_t;
				match(_t,BAND);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t132;
				_t = _t.getNextSibling();
				break;
			}
			case NOT_EQUAL:
			{
				AST __t133 = _t;
				AST tmp45_AST_in = (AST)_t;
				match(_t,NOT_EQUAL);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t133;
				_t = _t.getNextSibling();
				break;
			}
			case EQUAL:
			{
				AST __t134 = _t;
				AST tmp46_AST_in = (AST)_t;
				match(_t,EQUAL);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t134;
				_t = _t.getNextSibling();
				break;
			}
			case LT:
			{
				AST __t135 = _t;
				AST tmp47_AST_in = (AST)_t;
				match(_t,LT);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t135;
				_t = _t.getNextSibling();
				break;
			}
			case GT:
			{
				AST __t136 = _t;
				AST tmp48_AST_in = (AST)_t;
				match(_t,GT);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t136;
				_t = _t.getNextSibling();
				break;
			}
			case LE:
			{
				AST __t137 = _t;
				AST tmp49_AST_in = (AST)_t;
				match(_t,LE);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t137;
				_t = _t.getNextSibling();
				break;
			}
			case GE:
			{
				AST __t138 = _t;
				AST tmp50_AST_in = (AST)_t;
				match(_t,GE);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t138;
				_t = _t.getNextSibling();
				break;
			}
			case SL:
			{
				AST __t139 = _t;
				AST tmp51_AST_in = (AST)_t;
				match(_t,SL);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t139;
				_t = _t.getNextSibling();
				break;
			}
			case SR:
			{
				AST __t140 = _t;
				AST tmp52_AST_in = (AST)_t;
				match(_t,SR);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t140;
				_t = _t.getNextSibling();
				break;
			}
			case BSR:
			{
				AST __t141 = _t;
				AST tmp53_AST_in = (AST)_t;
				match(_t,BSR);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t141;
				_t = _t.getNextSibling();
				break;
			}
			case PLUS:
			{
				AST __t142 = _t;
				AST tmp54_AST_in = (AST)_t;
				match(_t,PLUS);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t142;
				_t = _t.getNextSibling();
				break;
			}
			case MINUS:
			{
				AST __t143 = _t;
				AST tmp55_AST_in = (AST)_t;
				match(_t,MINUS);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t143;
				_t = _t.getNextSibling();
				break;
			}
			case DIV:
			{
				AST __t144 = _t;
				AST tmp56_AST_in = (AST)_t;
				match(_t,DIV);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t144;
				_t = _t.getNextSibling();
				break;
			}
			case MOD:
			{
				AST __t145 = _t;
				AST tmp57_AST_in = (AST)_t;
				match(_t,MOD);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t145;
				_t = _t.getNextSibling();
				break;
			}
			case STAR:
			{
				AST __t146 = _t;
				AST tmp58_AST_in = (AST)_t;
				match(_t,STAR);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t146;
				_t = _t.getNextSibling();
				break;
			}
			case INC:
			{
				AST __t147 = _t;
				AST tmp59_AST_in = (AST)_t;
				match(_t,INC);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				_t = __t147;
				_t = _t.getNextSibling();
				break;
			}
			case DEC:
			{
				AST __t148 = _t;
				AST tmp60_AST_in = (AST)_t;
				match(_t,DEC);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				_t = __t148;
				_t = _t.getNextSibling();
				break;
			}
			case POST_INC:
			{
				AST __t149 = _t;
				AST tmp61_AST_in = (AST)_t;
				match(_t,POST_INC);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				_t = __t149;
				_t = _t.getNextSibling();
				break;
			}
			case POST_DEC:
			{
				AST __t150 = _t;
				AST tmp62_AST_in = (AST)_t;
				match(_t,POST_DEC);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				_t = __t150;
				_t = _t.getNextSibling();
				break;
			}
			case BNOT:
			{
				AST __t151 = _t;
				AST tmp63_AST_in = (AST)_t;
				match(_t,BNOT);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				_t = __t151;
				_t = _t.getNextSibling();
				break;
			}
			case LNOT:
			{
				AST __t152 = _t;
				AST tmp64_AST_in = (AST)_t;
				match(_t,LNOT);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				_t = __t152;
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_instanceof:
			{
				AST __t153 = _t;
				AST tmp65_AST_in = (AST)_t;
				match(_t,LITERAL_instanceof);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t153;
				_t = _t.getNextSibling();
				break;
			}
			case UNARY_MINUS:
			{
				AST __t154 = _t;
				AST tmp66_AST_in = (AST)_t;
				match(_t,UNARY_MINUS);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				_t = __t154;
				_t = _t.getNextSibling();
				break;
			}
			case UNARY_PLUS:
			{
				AST __t155 = _t;
				AST tmp67_AST_in = (AST)_t;
				match(_t,UNARY_PLUS);
				_t = _t.getFirstChild();
				expr2(_t);
				_t = _retTree;
				_t = __t155;
				_t = _t.getNextSibling();
				break;
			}
			case TYPE:
			case TYPECAST:
			case INDEX_OP:
			case METHOD_CALL:
			case IDENT:
			case DOT:
			case LITERAL_this:
			case LITERAL_super:
			case LITERAL_true:
			case LITERAL_false:
			case LITERAL_null:
			case LITERAL_new:
			case NUM_INT:
			case CHAR_LITERAL:
			case STRING_LITERAL:
			case NUM_FLOAT:
			case NUM_LONG:
			case NUM_DOUBLE:
			{
				primaryExpression2(_t);
				_t = _retTree;
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void methodCall(AST _t) throws RecognitionException {
		
		AST methodCall_AST_in = (AST)_t;
		AST n1 = null;
		AST el = null;
		
		try {      // for error handling
			AST __t15 = _t;
			n1 = _t==ASTNULL ? null :(AST)_t;
			match(_t,METHOD_CALL);
			_t = _t.getFirstChild();
			parameters = new LinkedList(); 
			_currentEXPRType = null; 
						       _parsingMethod = true;
						       _parsingMethodCaller = true;
			primaryExpression(_t);
			_t = _retTree;
			
			
						StringTokenizer st = new StringTokenizer(_currentEXPR.toString(), ".");
						int index = st.countTokens();
						if(index == 1) {
						    callerName = new String("this");
						    methodName = _currentEXPR.toString();
						    if(_currentEXPRType == null) {
						        callerType = _className;  // .... o className
						    }
						    else {
						        callerType = _currentEXPRType.toString();
						    }
						}
						else {
						    StringBuffer buf = new StringBuffer();
						    for(int i = 0;i < index - 1;i++) {
						        String tk = st.nextToken();
						        buf.append(tk);
							if(i < index - 2) buf.append(".");
			
							if(i == 0) continue; // eu ja carreguei o primeiro currentEXPRType no IDENT
			
							updateCurrentType(tk);
						    }
						    callerName = buf.toString();
						    methodName = st.nextToken();
			
						    // Metodo static
						    if(_currentEXPRType == null) {
						        Class c = Util.getType(callerName, null,
			_package, _currentCInfo.getImports());
							callerType = c.getName();
						    }
						    else {
						        callerType = _currentEXPRType.toString();
						    }
						}
						_parsingMethodCaller = false;
					
			el = _t==ASTNULL ? null : (AST)_t;
			elist(_t);
			_t = _retTree;
			
					         for(int i = 0;i < _exprList.size();i++) {
						     parameters.add((String) _exprList.get(i));
						 }
						 astList = el;
					
			_t = __t15;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void tcast(AST _t) throws RecognitionException {
		
		AST tcast_AST_in = (AST)_t;
		
		try {      // for error handling
			AST __t13 = _t;
			AST tmp68_AST_in = (AST)_t;
			match(_t,TYPECAST);
			_t = _t.getFirstChild();
			StringBuffer ret = new StringBuffer("((");
			typeSpec(_t);
			_t = _retTree;
			
					 ret.append(_typeName + " ");
					 for(int i = 0;i < _ntypeArray;i++) {
					     ret.append("[]");
					 }
				         ret.append(")");
				         returnType = _typeName;
			
			methodCall(_t);
			_t = _retTree;
			_t = __t13;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void methodInitializer(AST _t) throws RecognitionException {
		
		AST methodInitializer_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case ASSIGN:
			{
				AST __t18 = _t;
				AST tmp69_AST_in = (AST)_t;
				match(_t,ASSIGN);
				_t = _t.getFirstChild();
				initializer(_t);
				_t = _retTree;
				_t = __t18;
				_t = _t.getNextSibling();
				break;
			}
			case 3:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void initializer(AST _t) throws RecognitionException {
		
		AST initializer_AST_in = (AST)_t;
		_currentEXPR = new StringBuffer();
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case EXPR:
			{
				expression(_t);
				_t = _retTree;
				_initializer.append(_currentEXPR.toString());
				break;
			}
			case ARRAY_INIT:
			{
				arrayInitializer(_t);
				_t = _retTree;
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void expression(AST _t) throws RecognitionException {
		
		AST expression_AST_in = (AST)_t;
		
		try {      // for error handling
			AST __t24 = _t;
			AST tmp70_AST_in = (AST)_t;
			match(_t,EXPR);
			_t = _t.getFirstChild();
			expr(_t);
			_t = _retTree;
			_t = __t24;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void expr(AST _t) throws RecognitionException {
		
		AST expr_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case QUESTION:
			{
				String type1, type2;
				AST __t26 = _t;
				AST tmp71_AST_in = (AST)_t;
				match(_t,QUESTION);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); type1 = _currentEXPRType;
				expr(_t);
				_t = _retTree;
				String _exp3 = _currentEXPR.toString(); type2 = _currentEXPRType; 
							       
							       _currentEXPR = new StringBuffer("(" + _exp1 + ")?" + _exp2 + ":" + _exp3); 
							       
							       /*
							       if(!type1.equals(type2)) {
							           if((type1.equals("short") && type2.equals("byte")) ||
								      (type1.equals("byte") && type2.equals("short")) {
								       _currentEXPRType = new String("short");  
								   }
								   else {
								   
								   }
							       }*/
				
							
				_t = __t26;
				_t = _t.getNextSibling();
				break;
			}
			case ASSIGN:
			{
				AST __t27 = _t;
				AST tmp72_AST_in = (AST)_t;
				match(_t,ASSIGN);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString();
				_currentEXPR = new StringBuffer(_exp1 + " = " + _exp2); 
							
				_t = __t27;
				_t = _t.getNextSibling();
				break;
			}
			case PLUS_ASSIGN:
			{
				AST __t28 = _t;
				AST tmp73_AST_in = (AST)_t;
				match(_t,PLUS_ASSIGN);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer(_exp1 + " += " + _exp2);
								  
							
				_t = __t28;
				_t = _t.getNextSibling();
				break;
			}
			case MINUS_ASSIGN:
			{
				AST __t29 = _t;
				AST tmp74_AST_in = (AST)_t;
				match(_t,MINUS_ASSIGN);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString();
							          _currentEXPR = new StringBuffer(_exp1 + " -= " + _exp2);
						 	
				_t = __t29;
				_t = _t.getNextSibling();
				break;
			}
			case STAR_ASSIGN:
			{
				AST __t30 = _t;
				AST tmp75_AST_in = (AST)_t;
				match(_t,STAR_ASSIGN);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer(_exp1 + " *= " + _exp2);
							
				_t = __t30;
				_t = _t.getNextSibling();
				break;
			}
			case DIV_ASSIGN:
			{
				AST __t31 = _t;
				AST tmp76_AST_in = (AST)_t;
				match(_t,DIV_ASSIGN);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer(_exp1 + " /= " + _exp2);
							
				_t = __t31;
				_t = _t.getNextSibling();
				break;
			}
			case MOD_ASSIGN:
			{
				AST __t32 = _t;
				AST tmp77_AST_in = (AST)_t;
				match(_t,MOD_ASSIGN);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString();
							          _currentEXPR = new StringBuffer(_exp1 + " %= " + _exp2);
							
				_t = __t32;
				_t = _t.getNextSibling();
				break;
			}
			case SR_ASSIGN:
			{
				AST __t33 = _t;
				AST tmp78_AST_in = (AST)_t;
				match(_t,SR_ASSIGN);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString();
							          _currentEXPR = new StringBuffer(_exp1 + " >>= " + _exp2);
							
				_t = __t33;
				_t = _t.getNextSibling();
				break;
			}
			case BSR_ASSIGN:
			{
				AST __t34 = _t;
				AST tmp79_AST_in = (AST)_t;
				match(_t,BSR_ASSIGN);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer(_exp1 + " >>>= " + _exp2);
							
				_t = __t34;
				_t = _t.getNextSibling();
				break;
			}
			case SL_ASSIGN:
			{
				AST __t35 = _t;
				AST tmp80_AST_in = (AST)_t;
				match(_t,SL_ASSIGN);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer(_exp1 + " <<= " + _exp2);
							
				_t = __t35;
				_t = _t.getNextSibling();
				break;
			}
			case BAND_ASSIGN:
			{
				AST __t36 = _t;
				AST tmp81_AST_in = (AST)_t;
				match(_t,BAND_ASSIGN);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer(_exp1 + " &= " + _exp2);
							
				_t = __t36;
				_t = _t.getNextSibling();
				break;
			}
			case BXOR_ASSIGN:
			{
				AST __t37 = _t;
				AST tmp82_AST_in = (AST)_t;
				match(_t,BXOR_ASSIGN);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer(_exp1 + " ^= " + _exp2);
							
				_t = __t37;
				_t = _t.getNextSibling();
				break;
			}
			case BOR_ASSIGN:
			{
				AST __t38 = _t;
				AST tmp83_AST_in = (AST)_t;
				match(_t,BOR_ASSIGN);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer(_exp1 + " |= " + _exp2);
							
				_t = __t38;
				_t = _t.getNextSibling();
				break;
			}
			case LOR:
			{
				AST __t39 = _t;
				AST tmp84_AST_in = (AST)_t;
				match(_t,LOR);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " || " + _exp2 + ")");
								  _currentEXPRType = new String("boolean");
							
				_t = __t39;
				_t = _t.getNextSibling();
				break;
			}
			case LAND:
			{
				AST __t40 = _t;
				AST tmp85_AST_in = (AST)_t;
				match(_t,LAND);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " && " + _exp2 + ")");
								  _currentEXPRType = new String("boolean");
							
				_t = __t40;
				_t = _t.getNextSibling();
				break;
			}
			case BOR:
			{
				AST __t41 = _t;
				AST tmp86_AST_in = (AST)_t;
				match(_t,BOR);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " | " + _exp2 + ")");
							
				_t = __t41;
				_t = _t.getNextSibling();
				break;
			}
			case BXOR:
			{
				AST __t42 = _t;
				AST tmp87_AST_in = (AST)_t;
				match(_t,BXOR);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " ^ " + _exp2 + ")");
							
				_t = __t42;
				_t = _t.getNextSibling();
				break;
			}
			case BAND:
			{
				AST __t43 = _t;
				AST tmp88_AST_in = (AST)_t;
				match(_t,BAND);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " & " + _exp2 + ")");
							
				_t = __t43;
				_t = _t.getNextSibling();
				break;
			}
			case NOT_EQUAL:
			{
				AST __t44 = _t;
				AST tmp89_AST_in = (AST)_t;
				match(_t,NOT_EQUAL);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " != " + _exp2 + ")");
								  _currentEXPRType = new String("boolean");
							
				_t = __t44;
				_t = _t.getNextSibling();
				break;
			}
			case EQUAL:
			{
				AST __t45 = _t;
				AST tmp90_AST_in = (AST)_t;
				match(_t,EQUAL);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " == " + _exp2 + ")");
								  _currentEXPRType = new String("boolean");
							
				_t = __t45;
				_t = _t.getNextSibling();
				break;
			}
			case LT:
			{
				AST __t46 = _t;
				AST tmp91_AST_in = (AST)_t;
				match(_t,LT);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " < " + _exp2 + ")");
								  _currentEXPRType = new String("boolean");
							
				_t = __t46;
				_t = _t.getNextSibling();
				break;
			}
			case GT:
			{
				AST __t47 = _t;
				AST tmp92_AST_in = (AST)_t;
				match(_t,GT);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " > " + _exp2 + ")");
								  _currentEXPRType = new String("boolean");
							
				_t = __t47;
				_t = _t.getNextSibling();
				break;
			}
			case LE:
			{
				AST __t48 = _t;
				AST tmp93_AST_in = (AST)_t;
				match(_t,LE);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " <= " + _exp2 + ")");
							          _currentEXPRType = new String("boolean");
							
				_t = __t48;
				_t = _t.getNextSibling();
				break;
			}
			case GE:
			{
				AST __t49 = _t;
				AST tmp94_AST_in = (AST)_t;
				match(_t,GE);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " >= " + _exp2 + ")");
								  _currentEXPRType = new String("boolean");
							
				_t = __t49;
				_t = _t.getNextSibling();
				break;
			}
			case SL:
			{
				AST __t50 = _t;
				AST tmp95_AST_in = (AST)_t;
				match(_t,SL);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " << " + _exp2 + ")");
							
				_t = __t50;
				_t = _t.getNextSibling();
				break;
			}
			case SR:
			{
				AST __t51 = _t;
				AST tmp96_AST_in = (AST)_t;
				match(_t,SR);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " >> " + _exp2 + ")");
							
				_t = __t51;
				_t = _t.getNextSibling();
				break;
			}
			case BSR:
			{
				AST __t52 = _t;
				AST tmp97_AST_in = (AST)_t;
				match(_t,BSR);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " >>> " + _exp2 + ")");
							
				_t = __t52;
				_t = _t.getNextSibling();
				break;
			}
			case PLUS:
			{
				AST __t53 = _t;
				AST tmp98_AST_in = (AST)_t;
				match(_t,PLUS);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				
					                      String _exp1 = _currentEXPR.toString(); 
					                      String type1 = _currentEXPRType;
							
				expr(_t);
				_t = _retTree;
				
							      String _exp2 = _currentEXPR.toString(); 
							      _currentEXPR = new StringBuffer("(" + _exp1 + " + " + _exp2 + ")");
				String type2 = _currentEXPRType;				  
				
							      if(type1.equals("String") || type2.equals("String")) {
							          _currentEXPRType = new String("String");
						              }
						
				_t = __t53;
				_t = _t.getNextSibling();
				break;
			}
			case MINUS:
			{
				AST __t54 = _t;
				AST tmp99_AST_in = (AST)_t;
				match(_t,MINUS);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " - " + _exp2 + ")");
							
				_t = __t54;
				_t = _t.getNextSibling();
				break;
			}
			case DIV:
			{
				AST __t55 = _t;
				AST tmp100_AST_in = (AST)_t;
				match(_t,DIV);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " / " + _exp2 + ")");
							
				_t = __t55;
				_t = _t.getNextSibling();
				break;
			}
			case MOD:
			{
				AST __t56 = _t;
				AST tmp101_AST_in = (AST)_t;
				match(_t,MOD);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " % " + _exp2 + ")");
							      
							
				_t = __t56;
				_t = _t.getNextSibling();
				break;
			}
			case STAR:
			{
				AST __t57 = _t;
				AST tmp102_AST_in = (AST)_t;
				match(_t,STAR);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							      _currentEXPR = new StringBuffer("(" + _exp1 + " * " + _exp2 + ")");
							
				_t = __t57;
				_t = _t.getNextSibling();
				break;
			}
			case INC:
			{
				AST __t58 = _t;
				AST tmp103_AST_in = (AST)_t;
				match(_t,INC);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString(); 
					                     _currentEXPR = new StringBuffer("++" + _exp1); 
							
				_t = __t58;
				_t = _t.getNextSibling();
				break;
			}
			case DEC:
			{
				AST __t59 = _t;
				AST tmp104_AST_in = (AST)_t;
				match(_t,DEC);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString(); 
					                     _currentEXPR = new StringBuffer("--" + _exp1);
				_t = __t59;
				_t = _t.getNextSibling();
				break;
			}
			case POST_INC:
			{
				AST __t60 = _t;
				AST tmp105_AST_in = (AST)_t;
				match(_t,POST_INC);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString(); 
					                          _currentEXPR = new StringBuffer(_exp1 + "++");
				_t = __t60;
				_t = _t.getNextSibling();
				break;
			}
			case POST_DEC:
			{
				AST __t61 = _t;
				AST tmp106_AST_in = (AST)_t;
				match(_t,POST_DEC);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString(); 
					                          _currentEXPR = new StringBuffer(_exp1 + "--");
				_t = __t61;
				_t = _t.getNextSibling();
				break;
			}
			case BNOT:
			{
				AST __t62 = _t;
				AST tmp107_AST_in = (AST)_t;
				match(_t,BNOT);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString(); 
					                      _currentEXPR = new StringBuffer("(~" + _exp1 + ")");
				_t = __t62;
				_t = _t.getNextSibling();
				break;
			}
			case LNOT:
			{
				AST __t63 = _t;
				AST tmp108_AST_in = (AST)_t;
				match(_t,LNOT);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString(); 
					                      _currentEXPR = new StringBuffer("(!" + _exp1 + ")"); 
							
				_t = __t63;
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_instanceof:
			{
				AST __t64 = _t;
				AST tmp109_AST_in = (AST)_t;
				match(_t,LITERAL_instanceof);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString();
				expr(_t);
				_t = _retTree;
				String _exp2 = _currentEXPR.toString(); 
							          _currentEXPR = new StringBuffer("(" + _exp1 + " instanceof " + _exp2 + ")");
								  _currentEXPRType = new String("boolean");
							
				_t = __t64;
				_t = _t.getNextSibling();
				break;
			}
			case UNARY_MINUS:
			{
				AST __t65 = _t;
				AST tmp110_AST_in = (AST)_t;
				match(_t,UNARY_MINUS);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString(); 
					                             _currentEXPR = new StringBuffer("-" + _exp1);
				_t = __t65;
				_t = _t.getNextSibling();
				break;
			}
			case UNARY_PLUS:
			{
				AST __t66 = _t;
				AST tmp111_AST_in = (AST)_t;
				match(_t,UNARY_PLUS);
				_t = _t.getFirstChild();
				expr(_t);
				_t = _retTree;
				String _exp1 = _currentEXPR.toString(); 
					                            _currentEXPR = new StringBuffer("+" + _exp1);
				_t = __t66;
				_t = _t.getNextSibling();
				break;
			}
			case TYPE:
			case TYPECAST:
			case INDEX_OP:
			case METHOD_CALL:
			case IDENT:
			case DOT:
			case LITERAL_this:
			case LITERAL_super:
			case LITERAL_true:
			case LITERAL_false:
			case LITERAL_null:
			case LITERAL_new:
			case NUM_INT:
			case CHAR_LITERAL:
			case STRING_LITERAL:
			case NUM_FLOAT:
			case NUM_LONG:
			case NUM_DOUBLE:
			{
				primaryExpression(_t);
				_t = _retTree;
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void arrayIndex(AST _t) throws RecognitionException {
		
		AST arrayIndex_AST_in = (AST)_t;
		
		try {      // for error handling
			AST __t77 = _t;
			AST tmp112_AST_in = (AST)_t;
			match(_t,INDEX_OP);
			_t = _t.getFirstChild();
			StringBuffer _arrayIndexing = new StringBuffer(); String type;
			primaryExpression(_t);
			_t = _retTree;
			
					          _arrayIndexing.append(_currentEXPR.toString());
						  type = _currentEXPRType;
					
			expression(_t);
			_t = _retTree;
			
					          _arrayIndexing.append("[" + _currentEXPR.toString() + "]");
						  _currentEXPR = _arrayIndexing;
			
						  _currentEXPRType = type;
						  if(_currentEXPRType != null) {
						      Class c = Util.getType(_currentEXPRType, _className, _package, _currentCInfo.getImports());
						      if(!c.isArray()) {
						          System.out.println("ArrayIndex: type not array " + 
						              _currentEXPRType);
						      }
						      else {
						          _currentEXPRType = c.getComponentType().getName();
						      }
				                  }
					
			_t = __t77;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void typeSpecArray(AST _t) throws RecognitionException {
		
		AST typeSpecArray_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case ARRAY_DECLARATOR:
			{
				AST __t95 = _t;
				AST tmp113_AST_in = (AST)_t;
				match(_t,ARRAY_DECLARATOR);
				_t = _t.getFirstChild();
				_ntypeArray++;
				typeSpecArray(_t);
				_t = _retTree;
				_t = __t95;
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_void:
			case LITERAL_boolean:
			case LITERAL_byte:
			case LITERAL_char:
			case LITERAL_short:
			case LITERAL_int:
			case LITERAL_float:
			case LITERAL_long:
			case LITERAL_double:
			case IDENT:
			case DOT:
			{
				type(_t);
				_t = _retTree;
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void builtInType(AST _t) throws RecognitionException {
		
		AST builtInType_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case LITERAL_void:
			{
				AST tmp114_AST_in = (AST)_t;
				match(_t,LITERAL_void);
				_t = _t.getNextSibling();
				_currentEXPRType = new String("void");
				break;
			}
			case LITERAL_boolean:
			{
				AST tmp115_AST_in = (AST)_t;
				match(_t,LITERAL_boolean);
				_t = _t.getNextSibling();
				_currentEXPRType = new String("boolean");
				break;
			}
			case LITERAL_byte:
			{
				AST tmp116_AST_in = (AST)_t;
				match(_t,LITERAL_byte);
				_t = _t.getNextSibling();
				_currentEXPRType = new String("byte");
				break;
			}
			case LITERAL_char:
			{
				AST tmp117_AST_in = (AST)_t;
				match(_t,LITERAL_char);
				_t = _t.getNextSibling();
				_currentEXPRType = new String("char");
				break;
			}
			case LITERAL_short:
			{
				AST tmp118_AST_in = (AST)_t;
				match(_t,LITERAL_short);
				_t = _t.getNextSibling();
				_currentEXPRType = new String("short");
				break;
			}
			case LITERAL_int:
			{
				AST tmp119_AST_in = (AST)_t;
				match(_t,LITERAL_int);
				_t = _t.getNextSibling();
				_currentEXPRType = new String("int");
				break;
			}
			case LITERAL_float:
			{
				AST tmp120_AST_in = (AST)_t;
				match(_t,LITERAL_float);
				_t = _t.getNextSibling();
				_currentEXPRType = new String("float");
				break;
			}
			case LITERAL_long:
			{
				AST tmp121_AST_in = (AST)_t;
				match(_t,LITERAL_long);
				_t = _t.getNextSibling();
				_currentEXPRType = new String("long");
				break;
			}
			case LITERAL_double:
			{
				AST tmp122_AST_in = (AST)_t;
				match(_t,LITERAL_double);
				_t = _t.getNextSibling();
				_currentEXPRType = new String("double");
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void constant(AST _t) throws RecognitionException {
		
		AST constant_AST_in = (AST)_t;
		AST n1 = null;
		AST n2 = null;
		AST n3 = null;
		AST n4 = null;
		AST n5 = null;
		AST n6 = null;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case NUM_INT:
			{
				n1 = (AST)_t;
				match(_t,NUM_INT);
				_t = _t.getNextSibling();
				_currentConst = n1.getText(); _currentEXPRType = new String("int");
				break;
			}
			case CHAR_LITERAL:
			{
				n2 = (AST)_t;
				match(_t,CHAR_LITERAL);
				_t = _t.getNextSibling();
				_currentConst = n2.getText(); _currentEXPRType = new String("char");
				break;
			}
			case STRING_LITERAL:
			{
				n3 = (AST)_t;
				match(_t,STRING_LITERAL);
				_t = _t.getNextSibling();
				_currentConst = n3.getText(); _currentEXPRType = new String("String");
				break;
			}
			case NUM_FLOAT:
			{
				n4 = (AST)_t;
				match(_t,NUM_FLOAT);
				_t = _t.getNextSibling();
				_currentConst = n4.getText(); _currentEXPRType = new String("float");
				break;
			}
			case NUM_DOUBLE:
			{
				n5 = (AST)_t;
				match(_t,NUM_DOUBLE);
				_t = _t.getNextSibling();
				_currentConst = n5.getText(); _currentEXPRType = new String("double");
				break;
			}
			case NUM_LONG:
			{
				n6 = (AST)_t;
				match(_t,NUM_LONG);
				_t = _t.getNextSibling();
				_currentConst = n6.getText(); _currentEXPRType = new String("long");
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void arrayInitializer(AST _t) throws RecognitionException {
		
		AST arrayInitializer_AST_in = (AST)_t;
		
		try {      // for error handling
			AST __t80 = _t;
			AST tmp123_AST_in = (AST)_t;
			match(_t,ARRAY_INIT);
			_t = _t.getFirstChild();
			_initializer.append("{");
			initializer(_t);
			_t = _retTree;
			{
			_loop82:
			do {
				if (_t==null) _t=ASTNULL;
				if ((_t.getType()==EXPR||_t.getType()==ARRAY_INIT)) {
					_initializer.append(",");
					initializer(_t);
					_t = _retTree;
				}
				else {
					break _loop82;
				}
				
			} while (true);
			}
			_initializer.append("}");
			_t = __t80;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void type(AST _t) throws RecognitionException {
		
		AST type_AST_in = (AST)_t;
		AST n1 = null;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case IDENT:
			case DOT:
			{
				identifier(_t);
				_t = _retTree;
				_typeName = _currentID.toString(); 
							          _currentEXPRType = new String(_typeName);
				break;
			}
			case LITERAL_void:
			case LITERAL_boolean:
			case LITERAL_byte:
			case LITERAL_char:
			case LITERAL_short:
			case LITERAL_int:
			case LITERAL_float:
			case LITERAL_long:
			case LITERAL_double:
			{
				n1 = _t==ASTNULL ? null : (AST)_t;
				builtInType(_t);
				_t = _retTree;
				_typeName = n1.getText();
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void newArrayDeclarator(AST _t) throws RecognitionException {
		
		AST newArrayDeclarator_AST_in = (AST)_t;
		boolean hasEXPR = false;
		
		try {      // for error handling
			AST __t89 = _t;
			AST tmp124_AST_in = (AST)_t;
			match(_t,ARRAY_DECLARATOR);
			_t = _t.getFirstChild();
			{
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case ARRAY_DECLARATOR:
			{
				newArrayDeclarator(_t);
				_t = _retTree;
				break;
			}
			case 3:
			case EXPR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
			}
			{
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case EXPR:
			{
				expression(_t);
				_t = _retTree;
						       
							    _currentArrayDecl.append("[" + _currentEXPR.toString() + "]");
				hasEXPR = true; 
						
				break;
			}
			case 3:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
			}
			
					            if(!hasEXPR) {
						       _currentArrayDecl.append("[]");			   
						    }
					
			_t = __t89;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void identifier(AST _t) throws RecognitionException {
		
		AST identifier_AST_in = (AST)_t;
		AST x = null;
		AST y = null;
		_currentID = new StringBuffer();
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case IDENT:
			{
				x = (AST)_t;
				match(_t,IDENT);
				_t = _t.getNextSibling();
				_currentID.append(x.getText());
				break;
			}
			case DOT:
			{
				AST __t104 = _t;
				AST tmp125_AST_in = (AST)_t;
				match(_t,DOT);
				_t = _t.getFirstChild();
				identifier(_t);
				_t = _retTree;
				y = (AST)_t;
				match(_t,IDENT);
				_t = _t.getNextSibling();
				_t = __t104;
				_t = _t.getNextSibling();
				_currentID.append("." + y.getText());
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void modifier(AST _t) throws RecognitionException {
		
		AST modifier_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case LITERAL_private:
			{
				AST tmp126_AST_in = (AST)_t;
				match(_t,LITERAL_private);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_public:
			{
				AST tmp127_AST_in = (AST)_t;
				match(_t,LITERAL_public);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_protected:
			{
				AST tmp128_AST_in = (AST)_t;
				match(_t,LITERAL_protected);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_static:
			{
				AST tmp129_AST_in = (AST)_t;
				match(_t,LITERAL_static);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_transient:
			{
				AST tmp130_AST_in = (AST)_t;
				match(_t,LITERAL_transient);
				_t = _t.getNextSibling();
				break;
			}
			case FINAL:
			{
				AST tmp131_AST_in = (AST)_t;
				match(_t,FINAL);
				_t = _t.getNextSibling();
				break;
			}
			case ABSTRACT:
			{
				AST tmp132_AST_in = (AST)_t;
				match(_t,ABSTRACT);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_native:
			{
				AST tmp133_AST_in = (AST)_t;
				match(_t,LITERAL_native);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_threadsafe:
			{
				AST tmp134_AST_in = (AST)_t;
				match(_t,LITERAL_threadsafe);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_synchronized:
			{
				AST tmp135_AST_in = (AST)_t;
				match(_t,LITERAL_synchronized);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_const:
			{
				AST tmp136_AST_in = (AST)_t;
				match(_t,LITERAL_const);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_volatile:
			{
				AST tmp137_AST_in = (AST)_t;
				match(_t,LITERAL_volatile);
				_t = _t.getNextSibling();
				break;
			}
			case STRICTFP:
			{
				AST tmp138_AST_in = (AST)_t;
				match(_t,STRICTFP);
				_t = _t.getNextSibling();
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void identifierStar(AST _t) throws RecognitionException {
		
		AST identifierStar_AST_in = (AST)_t;
		AST x = null;
		AST y = null;
		AST y2 = null;
		_currentID = new StringBuffer();
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case IDENT:
			{
				x = (AST)_t;
				match(_t,IDENT);
				_t = _t.getNextSibling();
				_currentID.append(x.getText());
				break;
			}
			case DOT:
			{
				AST __t106 = _t;
				AST tmp139_AST_in = (AST)_t;
				match(_t,DOT);
				_t = _t.getFirstChild();
				identifier(_t);
				_t = _retTree;
				{
				if (_t==null) _t=ASTNULL;
				switch ( _t.getType()) {
				case STAR:
				{
					y = (AST)_t;
					match(_t,STAR);
					_t = _t.getNextSibling();
					_currentID.append(".*");
					break;
				}
				case IDENT:
				{
					y2 = (AST)_t;
					match(_t,IDENT);
					_t = _t.getNextSibling();
					_currentID.append("." + y2.getText());
					break;
				}
				default:
				{
					throw new NoViableAltException(_t);
				}
				}
				}
				_t = __t106;
				_t = _t.getNextSibling();
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void elist2(AST _t) throws RecognitionException {
		
		AST elist2_AST_in = (AST)_t;
		
		try {      // for error handling
			AST __t109 = _t;
			AST tmp140_AST_in = (AST)_t;
			match(_t,ELIST);
			_t = _t.getFirstChild();
			{
			_loop111:
			do {
				if (_t==null) _t=ASTNULL;
				if ((_t.getType()==EXPR)) {
					expression2(_t);
					_t = _retTree;
				}
				else {
					break _loop111;
				}
				
			} while (true);
			}
			_t = __t109;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void expression2(AST _t) throws RecognitionException {
		
		AST expression2_AST_in = (AST)_t;
		
		try {      // for error handling
			AST __t113 = _t;
			AST tmp141_AST_in = (AST)_t;
			match(_t,EXPR);
			_t = _t.getFirstChild();
			expr2(_t);
			_t = _retTree;
			_t = __t113;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void primaryExpression2(AST _t) throws RecognitionException {
		
		AST primaryExpression2_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case IDENT:
			{
				AST tmp142_AST_in = (AST)_t;
				match(_t,IDENT);
				_t = _t.getNextSibling();
				break;
			}
			case DOT:
			{
				AST __t157 = _t;
				AST tmp143_AST_in = (AST)_t;
				match(_t,DOT);
				_t = _t.getFirstChild();
				{
				if (_t==null) _t=ASTNULL;
				switch ( _t.getType()) {
				case TYPE:
				case TYPECAST:
				case INDEX_OP:
				case POST_INC:
				case POST_DEC:
				case METHOD_CALL:
				case UNARY_MINUS:
				case UNARY_PLUS:
				case IDENT:
				case DOT:
				case STAR:
				case LITERAL_this:
				case LITERAL_super:
				case ASSIGN:
				case PLUS_ASSIGN:
				case MINUS_ASSIGN:
				case STAR_ASSIGN:
				case DIV_ASSIGN:
				case MOD_ASSIGN:
				case SR_ASSIGN:
				case BSR_ASSIGN:
				case SL_ASSIGN:
				case BAND_ASSIGN:
				case BXOR_ASSIGN:
				case BOR_ASSIGN:
				case QUESTION:
				case LOR:
				case LAND:
				case BOR:
				case BXOR:
				case BAND:
				case NOT_EQUAL:
				case EQUAL:
				case LT:
				case GT:
				case LE:
				case GE:
				case LITERAL_instanceof:
				case SL:
				case SR:
				case BSR:
				case PLUS:
				case MINUS:
				case DIV:
				case MOD:
				case INC:
				case DEC:
				case BNOT:
				case LNOT:
				case LITERAL_true:
				case LITERAL_false:
				case LITERAL_null:
				case LITERAL_new:
				case NUM_INT:
				case CHAR_LITERAL:
				case STRING_LITERAL:
				case NUM_FLOAT:
				case NUM_LONG:
				case NUM_DOUBLE:
				{
					expr2(_t);
					_t = _retTree;
					{
					if (_t==null) _t=ASTNULL;
					switch ( _t.getType()) {
					case IDENT:
					{
						AST tmp144_AST_in = (AST)_t;
						match(_t,IDENT);
						_t = _t.getNextSibling();
						break;
					}
					case INDEX_OP:
					{
						arrayIndex2(_t);
						_t = _retTree;
						break;
					}
					case LITERAL_this:
					{
						AST tmp145_AST_in = (AST)_t;
						match(_t,LITERAL_this);
						_t = _t.getNextSibling();
						break;
					}
					case LITERAL_class:
					{
						AST tmp146_AST_in = (AST)_t;
						match(_t,LITERAL_class);
						_t = _t.getNextSibling();
						break;
					}
					case LITERAL_new:
					{
						AST __t160 = _t;
						AST tmp147_AST_in = (AST)_t;
						match(_t,LITERAL_new);
						_t = _t.getFirstChild();
						AST tmp148_AST_in = (AST)_t;
						match(_t,IDENT);
						_t = _t.getNextSibling();
						elist2(_t);
						_t = _retTree;
						_t = __t160;
						_t = _t.getNextSibling();
						break;
					}
					case LITERAL_super:
					{
						AST tmp149_AST_in = (AST)_t;
						match(_t,LITERAL_super);
						_t = _t.getNextSibling();
						break;
					}
					default:
					{
						throw new NoViableAltException(_t);
					}
					}
					}
					break;
				}
				case ARRAY_DECLARATOR:
				{
					AST __t161 = _t;
					AST tmp150_AST_in = (AST)_t;
					match(_t,ARRAY_DECLARATOR);
					_t = _t.getFirstChild();
					typeSpecArray2(_t);
					_t = _retTree;
					_t = __t161;
					_t = _t.getNextSibling();
					break;
				}
				case LITERAL_void:
				case LITERAL_boolean:
				case LITERAL_byte:
				case LITERAL_char:
				case LITERAL_short:
				case LITERAL_int:
				case LITERAL_float:
				case LITERAL_long:
				case LITERAL_double:
				{
					builtInType2(_t);
					_t = _retTree;
					{
					if (_t==null) _t=ASTNULL;
					switch ( _t.getType()) {
					case LITERAL_class:
					{
						AST tmp151_AST_in = (AST)_t;
						match(_t,LITERAL_class);
						_t = _t.getNextSibling();
						break;
					}
					case 3:
					{
						break;
					}
					default:
					{
						throw new NoViableAltException(_t);
					}
					}
					}
					break;
				}
				default:
				{
					throw new NoViableAltException(_t);
				}
				}
				}
				_t = __t157;
				_t = _t.getNextSibling();
				break;
			}
			case INDEX_OP:
			{
				arrayIndex2(_t);
				_t = _retTree;
				break;
			}
			case METHOD_CALL:
			{
				AST __t163 = _t;
				AST tmp152_AST_in = (AST)_t;
				match(_t,METHOD_CALL);
				_t = _t.getFirstChild();
				primaryExpression2(_t);
				_t = _retTree;
				elist2(_t);
				_t = _retTree;
				_t = __t163;
				_t = _t.getNextSibling();
				break;
			}
			case TYPECAST:
			{
				AST __t164 = _t;
				AST tmp153_AST_in = (AST)_t;
				match(_t,TYPECAST);
				_t = _t.getFirstChild();
				typeSpec2(_t);
				_t = _retTree;
				expr2(_t);
				_t = _retTree;
				_t = __t164;
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_new:
			{
				newExpression2(_t);
				_t = _retTree;
				break;
			}
			case NUM_INT:
			case CHAR_LITERAL:
			case STRING_LITERAL:
			case NUM_FLOAT:
			case NUM_LONG:
			case NUM_DOUBLE:
			{
				constant2(_t);
				_t = _retTree;
				break;
			}
			case LITERAL_super:
			{
				AST tmp154_AST_in = (AST)_t;
				match(_t,LITERAL_super);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_true:
			{
				AST tmp155_AST_in = (AST)_t;
				match(_t,LITERAL_true);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_false:
			{
				AST tmp156_AST_in = (AST)_t;
				match(_t,LITERAL_false);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_this:
			{
				AST tmp157_AST_in = (AST)_t;
				match(_t,LITERAL_this);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_null:
			{
				AST tmp158_AST_in = (AST)_t;
				match(_t,LITERAL_null);
				_t = _t.getNextSibling();
				break;
			}
			case TYPE:
			{
				typeSpec(_t);
				_t = _retTree;
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void arrayIndex2(AST _t) throws RecognitionException {
		
		AST arrayIndex2_AST_in = (AST)_t;
		
		try {      // for error handling
			AST __t166 = _t;
			AST tmp159_AST_in = (AST)_t;
			match(_t,INDEX_OP);
			_t = _t.getFirstChild();
			primaryExpression2(_t);
			_t = _retTree;
			expression2(_t);
			_t = _retTree;
			_t = __t166;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void typeSpecArray2(AST _t) throws RecognitionException {
		
		AST typeSpecArray2_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case ARRAY_DECLARATOR:
			{
				AST __t170 = _t;
				AST tmp160_AST_in = (AST)_t;
				match(_t,ARRAY_DECLARATOR);
				_t = _t.getFirstChild();
				typeSpecArray2(_t);
				_t = _retTree;
				_t = __t170;
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_void:
			case LITERAL_boolean:
			case LITERAL_byte:
			case LITERAL_char:
			case LITERAL_short:
			case LITERAL_int:
			case LITERAL_float:
			case LITERAL_long:
			case LITERAL_double:
			case IDENT:
			case DOT:
			{
				type2(_t);
				_t = _retTree;
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void builtInType2(AST _t) throws RecognitionException {
		
		AST builtInType2_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case LITERAL_void:
			{
				AST tmp161_AST_in = (AST)_t;
				match(_t,LITERAL_void);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_boolean:
			{
				AST tmp162_AST_in = (AST)_t;
				match(_t,LITERAL_boolean);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_byte:
			{
				AST tmp163_AST_in = (AST)_t;
				match(_t,LITERAL_byte);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_char:
			{
				AST tmp164_AST_in = (AST)_t;
				match(_t,LITERAL_char);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_short:
			{
				AST tmp165_AST_in = (AST)_t;
				match(_t,LITERAL_short);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_int:
			{
				AST tmp166_AST_in = (AST)_t;
				match(_t,LITERAL_int);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_float:
			{
				AST tmp167_AST_in = (AST)_t;
				match(_t,LITERAL_float);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_long:
			{
				AST tmp168_AST_in = (AST)_t;
				match(_t,LITERAL_long);
				_t = _t.getNextSibling();
				break;
			}
			case LITERAL_double:
			{
				AST tmp169_AST_in = (AST)_t;
				match(_t,LITERAL_double);
				_t = _t.getNextSibling();
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void typeSpec2(AST _t) throws RecognitionException {
		
		AST typeSpec2_AST_in = (AST)_t;
		
		try {      // for error handling
			AST __t168 = _t;
			AST tmp170_AST_in = (AST)_t;
			match(_t,TYPE);
			_t = _t.getFirstChild();
			typeSpecArray2(_t);
			_t = _retTree;
			_t = __t168;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void newExpression2(AST _t) throws RecognitionException {
		
		AST newExpression2_AST_in = (AST)_t;
		
		try {      // for error handling
			AST __t177 = _t;
			AST tmp171_AST_in = (AST)_t;
			match(_t,LITERAL_new);
			_t = _t.getFirstChild();
			type2(_t);
			_t = _retTree;
			{
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case ARRAY_DECLARATOR:
			{
				newArrayDeclarator2(_t);
				_t = _retTree;
				break;
			}
			case ELIST:
			{
				elist2(_t);
				_t = _retTree;
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
			}
			_t = __t177;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void constant2(AST _t) throws RecognitionException {
		
		AST constant2_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case NUM_INT:
			{
				AST tmp172_AST_in = (AST)_t;
				match(_t,NUM_INT);
				_t = _t.getNextSibling();
				break;
			}
			case CHAR_LITERAL:
			{
				AST tmp173_AST_in = (AST)_t;
				match(_t,CHAR_LITERAL);
				_t = _t.getNextSibling();
				break;
			}
			case STRING_LITERAL:
			{
				AST tmp174_AST_in = (AST)_t;
				match(_t,STRING_LITERAL);
				_t = _t.getNextSibling();
				break;
			}
			case NUM_FLOAT:
			{
				AST tmp175_AST_in = (AST)_t;
				match(_t,NUM_FLOAT);
				_t = _t.getNextSibling();
				break;
			}
			case NUM_DOUBLE:
			{
				AST tmp176_AST_in = (AST)_t;
				match(_t,NUM_DOUBLE);
				_t = _t.getNextSibling();
				break;
			}
			case NUM_LONG:
			{
				AST tmp177_AST_in = (AST)_t;
				match(_t,NUM_LONG);
				_t = _t.getNextSibling();
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void type2(AST _t) throws RecognitionException {
		
		AST type2_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case IDENT:
			case DOT:
			{
				identifier2(_t);
				_t = _retTree;
				break;
			}
			case LITERAL_void:
			case LITERAL_boolean:
			case LITERAL_byte:
			case LITERAL_char:
			case LITERAL_short:
			case LITERAL_int:
			case LITERAL_float:
			case LITERAL_long:
			case LITERAL_double:
			{
				builtInType2(_t);
				_t = _retTree;
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void identifier2(AST _t) throws RecognitionException {
		
		AST identifier2_AST_in = (AST)_t;
		
		try {      // for error handling
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case IDENT:
			{
				AST tmp178_AST_in = (AST)_t;
				match(_t,IDENT);
				_t = _t.getNextSibling();
				break;
			}
			case DOT:
			{
				AST __t173 = _t;
				AST tmp179_AST_in = (AST)_t;
				match(_t,DOT);
				_t = _t.getFirstChild();
				identifier2(_t);
				_t = _retTree;
				AST tmp180_AST_in = (AST)_t;
				match(_t,IDENT);
				_t = _t.getNextSibling();
				_t = __t173;
				_t = _t.getNextSibling();
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	public final void newArrayDeclarator2(AST _t) throws RecognitionException {
		
		AST newArrayDeclarator2_AST_in = (AST)_t;
		
		try {      // for error handling
			AST __t180 = _t;
			AST tmp181_AST_in = (AST)_t;
			match(_t,ARRAY_DECLARATOR);
			_t = _t.getFirstChild();
			{
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case ARRAY_DECLARATOR:
			{
				newArrayDeclarator2(_t);
				_t = _retTree;
				break;
			}
			case 3:
			case EXPR:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
			}
			{
			if (_t==null) _t=ASTNULL;
			switch ( _t.getType()) {
			case EXPR:
			{
				expression2(_t);
				_t = _retTree;
				break;
			}
			case 3:
			{
				break;
			}
			default:
			{
				throw new NoViableAltException(_t);
			}
			}
			}
			_t = __t180;
			_t = _t.getNextSibling();
		}
		catch (RecognitionException ex) {
			reportError(ex);
			if (_t!=null) {_t = _t.getNextSibling();}
		}
		_retTree = _t;
	}
	
	
	public static final String[] _tokenNames = {
		"<0>",
		"EOF",
		"<2>",
		"NULL_TREE_LOOKAHEAD",
		"BLOCK",
		"MODIFIERS",
		"OBJBLOCK",
		"SLIST",
		"CTOR_DEF",
		"METHOD_DEF",
		"VARIABLE_DEF",
		"INSTANCE_INIT",
		"STATIC_INIT",
		"TYPE",
		"CLASS_DEF",
		"INTERFACE_DEF",
		"PACKAGE_DEF",
		"ARRAY_DECLARATOR",
		"EXTENDS_CLAUSE",
		"IMPLEMENTS_CLAUSE",
		"PARAMETERS",
		"PARAMETER_DEF",
		"LABELED_STAT",
		"TYPECAST",
		"INDEX_OP",
		"POST_INC",
		"POST_DEC",
		"METHOD_CALL",
		"EXPR",
		"ARRAY_INIT",
		"IMPORT",
		"UNARY_MINUS",
		"UNARY_PLUS",
		"CASE_GROUP",
		"ELIST",
		"FOR_INIT",
		"FOR_CONDITION",
		"FOR_ITERATOR",
		"EMPTY_STAT",
		"\"final\"",
		"\"abstract\"",
		"\"strictfp\"",
		"SUPER_CTOR_CALL",
		"CTOR_CALL",
		"\"package\"",
		"SEMI",
		"\"import\"",
		"LBRACK",
		"RBRACK",
		"\"void\"",
		"\"boolean\"",
		"\"byte\"",
		"\"char\"",
		"\"short\"",
		"\"int\"",
		"\"float\"",
		"\"long\"",
		"\"double\"",
		"IDENT",
		"DOT",
		"STAR",
		"\"private\"",
		"\"public\"",
		"\"protected\"",
		"\"static\"",
		"\"transient\"",
		"\"native\"",
		"\"threadsafe\"",
		"\"synchronized\"",
		"\"volatile\"",
		"\"class\"",
		"\"extends\"",
		"\"interface\"",
		"LCURLY",
		"RCURLY",
		"COMMA",
		"\"implements\"",
		"LPAREN",
		"RPAREN",
		"\"this\"",
		"\"super\"",
		"ASSIGN",
		"\"throws\"",
		"COLON",
		"\"if\"",
		"\"else\"",
		"\"for\"",
		"\"while\"",
		"\"do\"",
		"\"break\"",
		"\"continue\"",
		"\"return\"",
		"\"switch\"",
		"\"throw\"",
		"\"case\"",
		"\"default\"",
		"\"try\"",
		"\"finally\"",
		"\"catch\"",
		"PLUS_ASSIGN",
		"MINUS_ASSIGN",
		"STAR_ASSIGN",
		"DIV_ASSIGN",
		"MOD_ASSIGN",
		"SR_ASSIGN",
		"BSR_ASSIGN",
		"SL_ASSIGN",
		"BAND_ASSIGN",
		"BXOR_ASSIGN",
		"BOR_ASSIGN",
		"QUESTION",
		"LOR",
		"LAND",
		"BOR",
		"BXOR",
		"BAND",
		"NOT_EQUAL",
		"EQUAL",
		"LT",
		"GT",
		"LE",
		"GE",
		"\"instanceof\"",
		"SL",
		"SR",
		"BSR",
		"PLUS",
		"MINUS",
		"DIV",
		"MOD",
		"INC",
		"DEC",
		"BNOT",
		"LNOT",
		"\"true\"",
		"\"false\"",
		"\"null\"",
		"\"new\"",
		"NUM_INT",
		"CHAR_LITERAL",
		"STRING_LITERAL",
		"NUM_FLOAT",
		"NUM_LONG",
		"NUM_DOUBLE",
		"WS",
		"SL_COMMENT",
		"ML_COMMENT",
		"ESC",
		"HEX_DIGIT",
		"VOCAB",
		"EXPONENT",
		"FLOAT_SUFFIX",
		"\"const\""
	};
	
	private static final long _tokenSet_0_data_[] = { -2305839160922996736L, 63L, 16777216L, 0L, 0L, 0L };
	public static final BitSet _tokenSet_0 = new BitSet(_tokenSet_0_data_);
	}
	
